package com.dtu.distributed.enums;

public enum Action {
	ADMIN, 
	TEMPERATURE, 
	AVERAGE, 
	STOP,
	FIND_ADMIN,
	NEW_ADMIN,
	YOU_ARE_ADMIN,
	WHO_IS_ADMIN,
	ELECT_NEW_ADMIN,
	ELECTION,
	ANSWER,
	COORDINATER;
	
	public static Action getAction(String action) {
		for (Action a : Action.values()) {
			if (action.equalsIgnoreCase(a.toString())) {
				return a;
			}
		}
		return null;
	}
}
